package com.loong.data.controller.forehead;

import com.loong.common.mvc.BaseForeheadController;
import com.loong.common.param.BaseIdParam;
import com.loong.common.rest.Result;
import com.loong.data.handler.GoodsCategoryHandler;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: hzp
 * @Date: 2020-12-3 17:41
 */
@RestController
@RequestMapping("forehead/data/goodsCategory")
public class GoodsCategoryForeheadController extends BaseForeheadController {
    @Resource
    private GoodsCategoryHandler goodsCategoryHandler;

    /**
     * 根据店铺id查询商品类型
     * @param param 店铺id
     * @return 响应的结果
     */
    @PostMapping("findListByShopId")
    public Result findGoodsById(@RequestBody BaseIdParam param){
        return handlerExecutor.execute(() -> goodsCategoryHandler.findGoodsCategoryModelByShopId(param));
    }
}
